package com.zhou.spring.service;

import com.zhou.spring.dao.UserDao;
import com.zhou.spring.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author zhouyanxiang
 * @create 2020-07-2020/7/13-20:56
 * Service层负责具体的细节逻辑处理
 */
@Service("UserService")
public class UserService {

    @Autowired
    UserDao userDao;

    public User login(String username, String password){
        System.out.println("username: " + username);
        System.out.println("Service ");
        System.out.println(userDao.getName(username));
        return new User(username,password);
    }
}
